var e = require("../../@babel/runtime/helpers/interopRequireDefault"), t = e(require("../../@babel/runtime/regenerator")), n = require("../../@babel/runtime/helpers/asyncToGenerator"), r = new (e(require("../../http/message")).default)();

Page({
    data: {
        content: [],
        titleArr: [ "系统消息", "系统消息", "订单通知", "积分变动" ]
    },
    onLoad: function(e) {
        this.getMessageContent(e.messageType, e.noticeDetailId), this.setTitle(e.messageType);
    },
    getMessageContent: function(e, a) {
        var i = this;
        return n(t.default.mark(function n() {
            var o;
            return t.default.wrap(function(t) {
                for (;;) switch (t.prev = t.next) {
                  case 0:
                    if ("undefined" != a) {
                        t.next = 3;
                        break;
                    }
                    return wx.showToast({
                        title: "当前暂无消息通知",
                        icon: "none",
                        duration: 2e3
                    }), t.abrupt("return");

                  case 3:
                    return t.next = 5, r.messageContent(e, a);

                  case 5:
                    o = t.sent, i.setData({
                        content: o.data
                    });

                  case 7:
                  case "end":
                    return t.stop();
                }
            }, n);
        }))();
    },
    setTitle: function(e) {
        wx.setNavigationBarTitle({
            title: this.data.titleArr[e - 1]
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {}
});